package org.lex.jdbc.url.view;

import java.io.File;

import org.lex.jdbc.url.persist.IDriverDao;
import org.lex.jdbc.url.persist.xml.XmlDriverDaoImpl;

public class DefaultJdbcConnectionModel implements IJdbcConnectionModel {
	private final File configDirectory;
	private IDriverDao driverDao = null;

	public DefaultJdbcConnectionModel(File configDirectory) {
		this.configDirectory = configDirectory;
	}

	@Override
	public IDriverDao getDriverDao() {
		if (null == driverDao) {
			driverDao = new XmlDriverDaoImpl(this.configDirectory);
		}
		return driverDao;
	}

}
